{% extends "base.html" %}
{% block content %}
<article>
    <section>
        <div class="text1">
            <header>
                <hgroup>
                    <h1>Welcome to our model library!</h1>
                    <h3>See what other users are doing! Collaborate!</h3>
                </hgroup>
            </header>
            <div>
                <table width="80%" class="datatable">
                    <thead>
                        <tr>
                            <th>
                                Name
                            </th>
                            <th>
                                Author
                            </th>
                            <th>
                                Last updated
                            </th>
                            <th>
                                Public
                            </th>
                            <th>
                                Download link
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for m in models%}
                        <tr>
                            <td>
                                <em><a href='/model?key="{{m.1}}"#slide1' target="_blank">{{m.0.name}}</a></em>
                            </td>
                            <td>
                                {{m.0.author.user}}
                            </td>
                            <td>
                                {{m.0.last_updated}}
                            </td>
                            <td>
                                {{m.0.public}}
                            </td>
                            <td>
                                <a href='/model/download?key="{{m.1}}"'>Download</a>
                            </td>
                        </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
    </section>
</article>
{% endblock %}